home *** CD-ROM | disk | FTP | other *** search
- Path: chaos.kulnet.kuleuven.ac.be!usenet
- From: loos@claus.esat.kuleuven.ac.be (Bert Loos)
- Newsgroups: gnu.gcc.help,comp.unix.programmer,comp.lang.c
- Subject: hsearch() in libc.a -- hashtable troubles
- Date: 09 Jan 1996 16:41:56 +0100
- Organization: K.U.Leuven
- Sender: loos@claus.esat.kuleuven.ac.be
- Message-ID: <wr3pwctfk8r.fsf@claus.esat.kuleuven.ac.be>
- NNTP-Posting-Host: claus.esat.kuleuven.ac.be
- X-Newsreader: Gnus v5.1
-
-
- I cannot understand this hsearch function. Even when I initialize
- a huge hashtable, hsearch(item,FIND) still bumps on full slots
- with 5-10% of the keys. (I use integers as keys, 0..2^24)
-
- Even worse, hsearch then *overwrites* the previous key value
- with the new one! Even with FIND as action, not ENTER!
- It should use the next free slot, right?
-
- Can anyone enlighten me please?
-
- --
- Bert Loos e-mail: loos@esat.kuleuven.ac.be
- K.U.Leuven, Dept.Elektrotechniek, ESAT-MI2 Tel: +32-16-321070
- Kard.Mercierlaan 94, B-3001 Leuven, BELGIUM Fax: +32-16-321986
- ^^^^^^^^^^^^^^^^ http://www.esat.kuleuven.ac.be/~loos ^^^^^^^^^^^^^^^^^^^
- geekcode3.1: GE d-- s:- a-- C++ UO++ P+ L E+ W+ N++ o? K- w--- O+ !M !V-
- PS+ PE Y+ PGP-- t 5+ X- R- tv(++) b++ !DI D+ G++ e+++(*) h*(--) r-- z-(+)
-